(function(){	
	/*
		Ctor: translator.encoding.foyue
		
		The implementation of shift encoder/decoder 
	*/
	translator.encodings.foyue = mapo.ctor(function(){
	}, translator.encodings.base);
	var p = translator.encodings.foyue.prototype;
	var shift = 4000;
	var top = 63000;
	var bottom = 18000;
	var name = String.fromCharCode(0x4F5B) + String.fromCharCode(0x66F0);
	var period = String.fromCharCode(0x3002);
	var colon = String.fromCharCode(65306);
	var qLeft = String.fromCharCode(12302);
	var qRight = String.fromCharCode(12303);
	p.prefix = qLeft + name + colon + "\"";
	p.subfix = period + "\"" + qRight;
	p.name = name;
	p.encode = function(msg){
		var chars = msg.split("");
		var i = chars.length;
		while(i--){
		    var tmp = chars[i].charCodeAt();
		    if (tmp > bottom && tmp < top){
			    chars[i] = String.fromCharCode(chars[i].charCodeAt() + shift);
			}
		}
		var encoded = chars.join("");
		return this.prefix + encoded+ this.subfix;
	};
	p.decode = function(msg){
		var ret = msg.trim().substr(this.prefix.length, msg.length - this.prefix.length);
		ret = ret.substr(0, ret.length - this.subfix.length);
		
		var chars = ret.split("");
		var i = chars.length;
		while(i--){
		    var tmp = chars[i].charCodeAt();
		    if (tmp > bottom + shift && tmp < top){
			    chars[i] = String.fromCharCode(chars[i].charCodeAt() - shift);
			}
		}
		ret = chars.join("");
		
		return ret;
	};
	
	new translator.encodings.foyue();
})();